from ronglian_sms_sdk import SmsSDK
from django.conf import settings


def send_message(phone, random_code, tid='1'):
    accId = settings.RL_ACCID
    accToken = settings.RL_ACCTOKEN
    appId = settings.RL_APPID
    sdk = SmsSDK(accId, accToken, appId)
    mobile = phone
    datas = (random_code, 5)
    resp = sdk.sendMessage(tid, mobile, datas)
    print(resp)
